﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ModalProgressBar.ascx.cs" Inherits="ModalProgressBar" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<script type="text/javascript" language="javascript">
    var ModalProgress = '<%= ModalProgress.ClientID %>';

    /* ---------- Progress Bar ------------------------*/
    Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(beginReq);
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endReq);

    function beginReq(sender, args) {
        // shows the Popup 
        $find(ModalProgress).show();
    }

    function endReq(sender, args) {
        //  shows the Popup 
        $find(ModalProgress).hide();
    }		   
</script>

<asp:Panel ID="panelUpdateProgress" runat="server">    
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0">
        <ProgressTemplate>
            <div style="POSITION: relative; TOP: 20%; TEXT-ALIGN: center">
                <img style="VERTICAL-ALIGN: middle" alt="Processing" src="../../cmn/img/img_loading.gif" /> 
                Un momento por favor ... 
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</asp:Panel>

<cc1:modalpopupextender ID="ModalProgress" runat="server" TargetControlID="panelUpdateProgress"
    BackgroundCssClass="modalBackground" PopupControlID="panelUpdateProgress">
</cc1:modalpopupextender>

